package com.qzsoft.zhjd.machine.modules.machinereport.controller;

import java.util.Map;

import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import com.qzsoft.jeemis.common.utils.Result;
import com.qzsoft.zhjd.common.utils.ResultUtils;
import com.qzsoft.zhjd.machine.modules.machinereport.dto.MachineReportIntactRateDto;
import com.qzsoft.zhjd.machine.modules.machinereport.service.MachineReportIntactRateService;

/**
 * @ClassName MachineReportIntactRateController
 * @Description 设备完好率控制器
 * @author linhuawei
 * @since 2021-11-04
 */
@RestController
@RequestMapping("/api/machineReportIntactRate")
public class MachineReportIntactRateController {
    
    @Autowired
    private MachineReportIntactRateService machineReportIntactRateService;


    /**
     * @Title page
     * @Description 设备完好率统计信息
     * @param params 查询条件
     * @return 设备完好率分页列表
     */
    @RequiresPermissions("api:machineReportIntactRate:count")
    @GetMapping("/count")
    public Result<MachineReportIntactRateDto> count(@RequestParam Map<String, Object> params) {
        MachineReportIntactRateDto data = machineReportIntactRateService.count(params);
        return ResultUtils.ok(data);
    }

}
